home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / EOFDirtyDoc / Controller.m < prev    next >
Text File  |  1995-04-19  |  751b  |  36 lines

  1. /*
  2.  * Controller.m
  3.  *
  4.  * You may freely copy, distribute, and reuse the code in this example.
  5.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  6.  * fitness for any particular use.
  7.  *
  8.  * Written by Kenny Leung, NeXT Technical Support
  9.  *
  10.  */
  11.  
  12. #import "Controller.h"
  13. #import <eointerface/EOController.h>
  14.  
  15. @implementation Controller
  16.  
  17. - discard:sender
  18. {
  19.     [controller endEditing];
  20.     [controller discardEdits];
  21.     [controller redisplay];
  22.     [docWindow setDocEdited:NO];
  23.     [discardButton setEnabled:NO];
  24.     return self;
  25. }
  26.  
  27. - (void)controller:(EOController *)aController associationDidBeginEditing:(EOAssociation *)association
  28. {
  29.     [docWindow setDocEdited:YES];
  30.     [discardButton setEnabled:YES];
  31.     
  32.     return;
  33. }
  34.  
  35. @end
  36.